﻿@model Services.User
@{
    ViewBag.Title = "Index";
}
<link href="~/Resource/Css/Site.css" rel="stylesheet" />
<script src="~/Resource/Js/jquery-1.9.1.js"></script>
<div class="login_container">
    @using (Html.BeginForm("Login", "Home", new { @ran = new Random() }))
    {
        <table class="tab">
            <tr>
                <td colspan="2" style="font-weight:bold;">用户登录</td>
            </tr>
            <tr>
                <td>用户名:</td>
                <td>@Html.TextBoxFor(m => m.Uid)</td>
            </tr>
            <tr>
                <td>密 码:</td>
                <td>@Html.PasswordFor(m => m.Pwd)</td>
            </tr>
            <tr>
                <td colspan="2" style="text-align:right;padding-right:100px;">
                    <input type="submit" onclick="return CheckForm()" class="btn" value="登陆" />
                </td>
            </tr>
        </table>
    }
</div>
<script type="text/javascript">
    function CheckForm() {
        var v1 = $("#Uid").val();
        var v2 = $("#Pwd").val();

        if (v1 == "" || v2 == "") {
            return false;
        }
        return true;
    }
</script>
